﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
    public class Data
    {
        public SqlConnection GetConnection()
        {
            SqlConnection conn = new SqlConnection(Config.ConnectionString);
            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
                return conn;
            }
            else
            {
                return conn;
            }
        }
    }
}
